package com.xinchuang.controller;

import com.alibaba.fastjson.JSONObject;
import com.xinchuang.common.Result;
import com.xinchuang.service.targetSystem.SubTargetAnalysisService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(value = "子目标分析controller", tags = {"子目标分析维护接口"})
@RequestMapping("/subTargetAnalysis")
@RestController
public class SubTargetAnalysisController {

    @Resource
    private SubTargetAnalysisService subTargetAnalysisService;

    @ApiOperation("整体分析列表查询")
    @PostMapping("/getSubTargetAnalysisTotalList")
    public Result getSubTargetAnalysisTotalList(@RequestBody JSONObject jsonObject) {
        return subTargetAnalysisService.getSubTargetAnalysisTotalList(jsonObject);
    }

    @ApiOperation("静态分析列表查询")
    @PostMapping("/getSubTargetAnalysisStaticList")
    public Result getSubTargetAnalysisStaticList(@RequestBody JSONObject jsonObject) {
        return subTargetAnalysisService.getSubTargetAnalysisStaticList(jsonObject);
    }

    @ApiOperation("规律分析列表查询")
    @PostMapping("/getSubTargetAnalysisRegularList")
    public Result getSubTargetAnalysisRegularList(@RequestBody JSONObject jsonObject) {
        return subTargetAnalysisService.getSubTargetAnalysisRegularList(jsonObject);
    }

    @ApiOperation("动态分析列表查询")
    @PostMapping("/getSubTargetAnalysisDynamicList")
    public Result getSubTargetAnalysisDynamicList(@RequestBody JSONObject jsonObject) {
        return subTargetAnalysisService.getSubTargetAnalysisDynamicList(jsonObject);
    }

    @ApiOperation("意图分析列表查询")
    @PostMapping("/getSubTargetAnalysisIntentList")
    public Result getSubTargetAnalysisIntentList(@RequestBody JSONObject jsonObject) {
        return subTargetAnalysisService.getSubTargetAnalysisIntentList(jsonObject);
    }

    @ApiOperation("关联分析列表查询")
    @PostMapping("/getSubTargetAnalysisRelateList")
    public Result getSubTargetAnalysisRelateList(@RequestBody JSONObject jsonObject) {
        return subTargetAnalysisService.getSubTargetAnalysisRelateList(jsonObject);
    }

    @ApiOperation("获取停驻MB树")
    @PostMapping("/getStayTargetList")
    public Result getStayTargetList(@RequestBody JSONObject jsonObject) {
        return subTargetAnalysisService.getStayTargetList(jsonObject);
    }

    @ApiOperation("上传交战坐标")
    @PostMapping("/uploadFightPosition")
    public Result uploadFightPosition(@RequestBody JSONObject jsonObject) {
        return subTargetAnalysisService.uploadFightPosition(jsonObject);
    }

    @ApiOperation("获取子MB下拉框")
    @PostMapping("/getSubTargetList")
    public Result getSubTargetList(@RequestBody JSONObject jsonObject) {
        return subTargetAnalysisService.getSubTargetList(jsonObject);
    }

    @ApiOperation("获取已保存的入参")
    @PostMapping("/getParam")
    public Result getParam(@RequestBody JSONObject jsonObject) {
        return subTargetAnalysisService.getParam(jsonObject);
    }
}
